﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Subfamilias.aspx.cs" Inherits="Sitio.Subfamilias" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <link href ="estilo.css"  rel="Stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            font-size: large;
            width: 10px;
        }
        .style3
        {
            font-size: small;
            width: 10px;
            height: 51px;
        }
        .style4
        {
            height: 51px;
        }
        .style5
        {
            height: 51px;
            width: 10px;
        }
        .style11
        {
            font-size: medium;
            width: 10px;
            height: 32px;
        }
        .style12
        {
            height: 32px;
        }
        .style13
        {
            height: 32px;
            width: 10px;
        }
        .style14
        {
             
            font-size: medium;
            width: 10px;
            height: 6px;
        }
        .style15
        {
            height: 6px;
        }
        .style16
        {
            height: 6px;
            width: 10px;
        }
        .style17
        {
            font-size: medium;
            width: 109px;
            height: 25px;
        }
        .style18
        {
            height: 25px;
        }
        .style19
        {
            height: 25px;
            width: 10px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="style1">
    
        <strong> SubFamilias<strong style="font-size: medium">&nbsp;&nbsp; <br />
        <asp:Label ID="lblMensaje" runat="server" style="background-color: #FF0000"></asp:Label>
        <br style="font-size: small" />
        <asp:Panel ID="op" runat="server" Height="32px" Width="476px">
            <asp:Button ID="btNuevo" runat="server" Text="Nuevo" onclick="btNuevo_Click" 
                style="font-size: medium" />
            <strong>
            <asp:Button ID="btBuscar" runat="server" Text="Buscar" 
                onclick="btBuscar_Click" style="font-size: medium" />

            &nbsp;&nbsp;&nbsp;&nbsp;<strong style="font-size: medium"><asp:Button ID="btRegresar" 
                runat="server" onclick="btRegresar_Click" style="font-size: medium" 
                Text="Regresar" />
            </strong>&nbsp;&nbsp;&nbsp;&nbsp;

            </strong>

            <%--<asp:Button ID="btRegresar" runat="server" onclick="btRegresar_Click1" 
                Text="Volver a la Pagina Principal" />--%>

        </asp:Panel>
        <asp:Panel ID="pnlNuevo" runat="server" style="margin-top: 35px" Width="1288px" 
            Height="100px">
            
                </strong>
                <table style="width:113%; height: 198px; margin-top: 0px;">
                <tr>
                    <td class="style14">
                        Nombre:</td>
                    <strong>
                    <td class="style15">
                        <asp:TextBox ID="txtNombre" runat="server" Width="250px"></asp:TextBox>
                        &nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RFVNombre" runat="server" 
                            ControlToValidate="txtNombre" ErrorMessage="RequiredFieldValidator" 
                            ValidationGroup="Validar">Ingrese Nombre</asp:RequiredFieldValidator>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:RegularExpressionValidator ID="REVNombre" runat="server" 
                            ControlToValidate="txtNombre" ErrorMessage="RegularExpressionValidator" 
                            ValidationGroup="Validar" ValidationExpression="[a-zA-ZñÑ\s]{2,50}">Ingrese Solo Letras</asp:RegularExpressionValidator>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtCodigo" runat="server" Visible="False" 
                            ontextchanged="txtCodigo_TextChanged" ReadOnly="True" 
                            style="margin-left: 26px"></asp:TextBox>
                    </td>
                    <td class="style16">
                        </td>
                    </strong>
                </tr>
                <tr>
                    <td class="style17">
                        Descripcion:</td>
                    <strong>
                    <td class="style18">
                        <asp:TextBox ID="txtDescripcion" runat="server" Width="245px" Height="23px"></asp:TextBox>
                        &nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txtDescripcion" ErrorMessage="RequiredFieldValidator" 
                            ValidationGroup="Validar">Ingrese Descripcion</asp:RequiredFieldValidator>
                        &nbsp;</td>
                    <td class="style19">
                        </td>
                    </strong>
                </tr>

                <tr>
                    <td class="style11">
                        Familias:</td>
                    <td class="style12">
                        <asp:DropDownList ID="ddlSubfamilia" runat="server" Height="46px" Width="242px" style="font-size: medium" 
                            >
                        </asp:DropDownList>
                    </td>
                    <td class="style13">
                        </td>
                </tr>
                <tr>
                    <td class="style3">
                        </td>
                    <td class="style">
                        <asp:Button ID="btGuardar" runat="server" Text="Guardar" 
                            style="height: 26px; width: 56px" onclick="btGuardar_Click" 
                            ValidationGroup="Validar" />
                    </td>
                    <td class="style5">
                        </td>
                </tr>
           </asp:Panel>
        <asp:Panel ID="pnlBuscar" runat="server" Height="135px">
            <asp:GridView ID="grdSubfamilias" runat="server" AutoGenerateColumns="False" 
                onrowcommand="ResultGrid_RowCommand" 
                onselectedindexchanged="grdSubfamilias_SelectedIndexChanged" 
                BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                CellPadding="4" EnableModelValidation="True" ForeColor="Black" 
                GridLines="Horizontal" style="margin-top: 141px">
                <EmptyDataTemplate>
                    No se encontraron resultados para la busqueda.
                </EmptyDataTemplate>
                <Columns>
                    <asp:BoundField DataField="id" HeaderText="Codigo" Visible="false" />
                    <asp:TemplateField HeaderText="Eliminar"> 
			            <ItemTemplate>
                            <asp:ImageButton runat="server" ID="Delete" ImageUrl="~/ImagenesGridView/eliminar.png" CommandName="Eliminar" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LSUBFAMILIAS1") %>'  />
                            
			            </ItemTemplate>
		            </asp:TemplateField>
                    <asp:TemplateField HeaderText="Editar">            
			            <ItemStyle HorizontalAlign="Center"></ItemStyle>
			            <ItemTemplate>
                            <asp:ImageButton runat="server" ID="Edit" ImageUrl="~/ImagenesGridView/editar.jpg" CommandName="Editar" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LSUBFAMILIAS1") %>' />
			            </ItemTemplate>
		            </asp:TemplateField>
                    <asp:BoundField DataField="SNOMBRE1" HeaderText="Nombre"/>
                    <asp:BoundField DataField="SDESCRIPCION1" HeaderText="Descripcion"/>   
                </Columns>
                <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            </asp:GridView>
        </asp:Panel>
        <br />
        <br />
        <br />
        </strong>
    
    </div>
    </form>
</body>
</html>
